<?php 
 
if ( ! function_exists('curPageName'))
{
	function curPageName() {
	 return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
	}
}

if ( ! function_exists('getCurrentMenu'))
{
	function getCurrentMenu($MenuName){
		$currentpage = $_SERVER["REQUEST_URI"];
		$_result="";
		$_pos=strpos($currentpage,$MenuName);
		if($_pos>-1){
			$_result="class=\"menuhover\"";			
		}
		return $_result;
	}
}

if ( ! function_exists('curPageURL'))
{
		function curPageURL() 
		{
			 $pageURL = 'http';
			 //if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
			 if (!empty($_SERVER['HTTPS'])) {$pageURL .= "s";}  
			 $pageURL .= "://";
			 if ($_SERVER["SERVER_PORT"] != "80") {
			  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
			 } else {
			  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
			 }
			 return $pageURL;
		}
}

 if ( ! function_exists('GetTrEffects'))
{
		function GetTrEffects() 
		{
		 
			 return " onmouseover='tr_onmouseover(this)' onmouseout='tr_onmouseout(this)' onclick='tr_onclick(this)' active='false' ";
		}
}
